package edu.wayne.cs.csc4110.hw6.framework.gui.inbox;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;

import edu.wayne.cs.csc4110.hw6.framework.Util.Constants;
import edu.wayne.cs.csc4110.hw6.interfaces.user.User;

public class InboxFrame extends JFrame {
	private JPanel container;
	private MessagesPanel messagesPanel;
	private InboxNavigation navigationPanel;

	public InboxFrame(User user) {
		this.setTitle("Inbox");
		container = new JPanel();
		messagesPanel = new MessagesPanel(user);
		navigationPanel = new InboxNavigation(user);
		container.setLayout(new BorderLayout());
		container.add(navigationPanel, BorderLayout.NORTH);
		container.add(messagesPanel, BorderLayout.CENTER);
		setPreferredSize(Constants.INBOX_FRAME_PREFERRED_SIZE);
		this.getContentPane().add(container);
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

		pack();
		setVisible(true);
	}
}
